package iedcyt.acute.controller.listeners.authorMerge;

import iedcyt.acute.model.AuthorMergeModel;
import iedcyt.acute.view.AuthorMergeView;
import org.eclipse.swt.widgets.Event;
import org.eclipse.swt.widgets.Listener;

public class SearchAuthorTxtFocusInListener implements Listener {

	private AuthorMergeModel _model;
	private AuthorMergeView _view;
	
	public SearchAuthorTxtFocusInListener(AuthorMergeView view, AuthorMergeModel model) {
		this._model = model;
		this._view = view;
	}
	
	public void handleEvent(Event event) {
		_model.searchAuthorText_FocusIn();
		
		_view.setSearchText(_model.getSearch());
		_view.setFilterCode(_model.getFilterCode());
		
		_view.compareTables();
	}
}
